<?php
/**
 * User: aka
 * Time: 0:24
 */

namespace app\tenno\controller;

use think\facade\Session;

class MyStuff
{
    private $userId;

    public function __construct()
    {
        $this->userId = Session::get('user_info.id');
    }

    public function __destruct()
    {
        unset($this->userId);
    }

    public function mod()
    {
        $list = \app\tenno\model\Mod::index(0)
            ->uid($this->userId)
            ->paginate(10);
        return view('mod', ['list' => $list]);
    }

    public function primeWeapon()
    {
        $list = \app\tenno\model\Prime::index(0)
            ->type(1)
            ->uid($this->userId)
            ->paginate(10);
        return view('prime_weapon', ['list' => $list]);
    }

    public function primeWarFrame()
    {
        $list = \app\tenno\model\Prime::index(0)
            ->type(2)
            ->uid($this->userId)
            ->paginate(10);
        return view('prime_war_frame', ['list' => $list]);
    }

    public function riven()
    {
        $list = \app\tenno\model\Riven::index(0)
            ->uid($this->userId)
            ->paginate(10);
        return view('riven', ['list' => $list]);
    }

    public function gold()
    {
        $list = \app\tenno\model\Other::index(0)
            ->type(2)
            ->uid($this->userId)
            ->paginate(10);
        return view('gold', ['list' => $list]);
    }

    public function silver()
    {
        $list = \app\tenno\model\Other::index(0)
            ->type(3)
            ->uid($this->userId)
            ->paginate(10);
        return view('silver', ['list' => $list]);
    }

    public function arcane()
    {
        $list = \app\tenno\model\Other::index(0)
            ->type(4)
            ->uid($this->userId)
            ->paginate(10);
        return view('arcane', ['list' => $list]);
    }

    public function sculpt()
    {
        $list = \app\tenno\model\Other::index(0)
            ->type(5)
            ->uid($this->userId)
            ->paginate(10);
        return view('sculpt', ['list' => $list]);
    }

    public function kuWa()
    {
        $list = \app\tenno\model\Other::index(0)
            ->type(6)
            ->uid($this->userId)
            ->paginate(10);
        return view('ku_wa', ['list' => $list]);
    }

    public function kuBo()
    {
        $list = \app\tenno\model\Other::index(0)
            ->type(7)
            ->uid($this->userId)
            ->paginate(10);
        return view('ku_bo', ['list' => $list]);
    }

    public function other()
    {
        $list = \app\tenno\model\Other::index(0)
            ->type(1)
            ->uid($this->userId)
            ->paginate(10);
        return view('other', ['list' => $list]);
    }
}